<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <title>退款记录</title>
    <#include "/include/resource.html"/>
    <script type="application/javascript">
        function confirmToCancel(id){
            bootbox.confirm("Confirm the delete action!？", function (result) {
                if (result) {
                    $.ajax({
                        type: "POST",
                        url: "${base}/admin/refundLog/delete?id="+id,
                        dataType: "json",
                        success: function(data){
                            console.log(data);
                            if(typeof(data)!='undefined'){

                                $('#myModal').modal('show');
                            }
                        },
                        error:function(){

                        }
                    });
                }
            });
        }
    </script>
</head>
<body class="hold-transition skin-blue sidebar-mini">
<div class="wrapper">
    <#include "/include/header.html"/>
    <#include "/include/main-sidebar.html"/>
    <!-- Content Wrapper. Contains page content -->
    <div class="content-wrapper">
        <!-- Content Header (Page header) -->
        <section class="content-header">
            <h1>
                <small> 退款记录</small>
            </h1>
            <ol class="breadcrumb">
                <li><i class="fa fa-dashboard"></i> </li>
                <li class="active">退款记录</li>
            </ol>
        </section>

        <!-- Main content -->
        <section class="content">
            <div class="row">
                <div class="col-md-12">
                    <div class="box">
                        <div class="box-header with-border">
                            <h3 class="box-title">${payLog.riderName}-${payLog.phone}:退款记录</h3>
                            <a type="button" class="btn btn-block btn-primary btn-sm add" onclick="HF.showDialog('${base}/admin/refundLog/operate?id=${payLog.id?c}')" href="#">Add</a>
                        </div>
                        <!-- /.box-header -->
                        <div class="box-body">
                            <form id="tableForm" method="post" class="form-horizontal" action="${base}/admin/refundLog/list">
                            <table class="table table-bordered">
                                <tr>
                                    <th>SequenceNo</th>
                                    <th>骑手Id</th>
                                    <th>骑手Name</th>
                                    <th>手机号码</th>
                                    <th>Valid</th>
                                    <th>Note</th>
                                    <th>退款日期</th>
                                    <th>Status</th>
                                    <th>类型</th>
                                    <th>金额</th>
                                    <th>优惠券Id</th>
                                </tr>
                               <#if list??&&list?size gt 0>
                               <#list list as t>
                                <tr>
                                    <td>${t_index+1}</td>
                                    <td>${(t.riderId)!}</td>
                                    <td>${(t.riderName)!}</td>
                                    <td>${(t.phone)!}</td>
                                    <td>${(t.valid)?string('Valid','Invalid')}</td>
                                    <td>${(t.memo)!}</td>
                                    <td>${nav.getDate((t.createDate)!"")}</td>
                                    <td>${(t.status==0)?string('退款中。。。','已经完成')}</td>

                                <td>${(t.catagory)!}</td>
                                <td>${(t.refundMoney)!}</td>
                                <td>${(t.payLogId)!}</td>
                                    </tr>
                                    </#list>
                                    <#else>
                                        <td colspan="11" align="center">no record!</td>

                                </#if>
                            </table>
                        </div>
                        <!-- /.box-body -->
                        <@p.pager pageNo=pageNo pageSize=pageSize totalCount=totalCount />
                        </form>
                    </div>
                    <!-- /.box -->
                </div>
            </div>
        </section>
        <!-- /.content -->
    </div>
    <!-- 弹出窗口 -->
    <#include "/include/modal.html"/>
    <#include "/include/footer.html"/>

    <!-- /.content-wrapper -->

    <div class="control-sidebar-bg"></div>
</div>
<#include "/include/js_footer.html"/>

<script type="application/javascript">
    $(function () {

//        $('#reservation').daterangepicker();
//      //  $('#reservation').daterangepicker({autoUpdateInput:false});
//        $('.reservation').daterangepicker({
//
//            startDate:'', endDate:''})
        $.fn.datepicker.defaults.format = "yyyy-mm-dd";
        $('#datepicker').datepicker({
            autoclose: true
        })

        $('#datepicker_').datepicker({
            autoclose: true
        })

    })
</script>
</body>

</html>
